extends Control
class_name UnitActionUI

@export var attck_manager:AttackManager
@export var input_manager:InputManager

@onready var game_state_machine: StateChart = $"../../GameStateMachine"


func _on_move_pressed() -> void:
	game_state_machine.send_event("selectMoveAction")


func _on_attack_pressed() -> void:
	game_state_machine.send_event("selectAttackAction")



func show_ui() -> void:
	var selected_player_unit : Player = input_manager.player_chosen
	if not selected_player_unit:
		return
	visible = true
	position = selected_player_unit.position + Vector2(8, -25)
	pass # Replace with function body.
